home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / misc_src / cmmdlg / myprn_.pas < prev    next >
Pascal/Delphi Source File  |  1995-11-01  |  2KB  |  93 lines

  1. {µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ}
  2. {   \\\                                    }
  3. {  -(j)-                                   }
  4. {    /juanca                               }
  5. {    ~                                     }
  6. {$D ⌐ ACASA 1989-1992, All rights reserved }
  7. {µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ}
  8.  
  9. { tMyPrinter, showing how to override tPrinter to show your own dialogs }
  10.  
  11. UNIT MYPRN_;
  12. {$C MOVEABLE DEMANDLOAD DISCARDABLE}
  13. INTERFACE
  14.   USES
  15.     PRN31_;
  16.  
  17.   TYPE
  18.     tMyPrinter = OBJECT(tPrinter)
  19.        useBWCC :Boolean;
  20.  
  21.        CONSTRUCTOR
  22.        init;
  23.  
  24.        PROCEDURE
  25.        setBWCCuse(onOff :Boolean);
  26.  
  27.        FUNCTION
  28.        setupTemplate :PChar;
  29.          virtual;
  30.  
  31.        FUNCTION
  32.        optionsTemplate :PChar;
  33.          virtual;
  34.  
  35.        FUNCTION
  36.        abortTemplate :PChar;
  37.          virtual;
  38.     END;
  39.  
  40.  
  41. {****************************************************************}
  42. IMPLEMENTATION
  43.  
  44.        CONSTRUCTOR
  45.        tMyPrinter.
  46.        {}
  47.        init;
  48.          begin
  49.            tPrinter.init;
  50.            useBWCC := FALSE
  51.          end;
  52.  
  53.        PROCEDURE
  54.        tMyPrinter.
  55.        {}
  56.        setBWCCuse(onOff :Boolean);
  57.          begin
  58.            useBWCC := onOff
  59.          end;
  60.  
  61.        FUNCTION
  62.        tMyPrinter.
  63.        {}
  64.        setupTemplate :PChar;
  65.          begin
  66.            if useBWCC
  67.            then
  68.              setupTemplate := 'PRINTSETUP31'
  69.            else
  70.              setupTemplate := tPrinter.setupTemplate
  71.          end;
  72.  
  73.  
  74.        FUNCTION
  75.        tMyPrinter.
  76.        {}
  77.        optionsTemplate :PChar;
  78.          begin
  79.            if useBWCC
  80.            then
  81.              optionsTemplate := 'PRINTOPT31'
  82.            else
  83.              optionsTemplate := tPrinter.optionsTemplate
  84.          end;
  85.  
  86.        FUNCTION
  87.        tMyPrinter.
  88.        {}
  89.        abortTemplate :PChar;
  90.          begin
  91.            abortTemplate := tPrinter.abortTemplate
  92.          end;
  93. END.